import React, { Component } from 'react';
import {  addTodo} from "../actions";
class Operate extends Component {
    handle = txt =>{
        debugger
       // this.props.actions.addTodo(new Date().toString())
       setInterval(()=>{
        this.props.dispatch(addTodo(new Date().toString()))
       },1000*4)
       
    }
    render() {
        return (
            <div style={{backgroundColor:'#eee' , display:'inline-block',marginLeft:'20px'}}>
                <a  style={{ display:'inline-block',marginLeft:'20px'}} >undo</a>
                <a  style={{ display:'inline-block',marginLeft:'20px'}} onClick={this.handle}>add</a>
                <a style={{ display:'inline-block',marginLeft:'20px'}}>delete</a>
            </div>
        );
    }
}

export default Operate;